Dynomotion

Group: DynoMotion Message: 10311 From: Sam Marrocco Date: 10/11/2014
Subject: Re: Rotational Axes & Radius relationship..additional settings
On 10/9/2014 8:55 AM, Sam Marrocco SMarrocco@... [DynoMotion] wrote:
 


On 10/9/2014 1:17 AM, Tom Kerekes tk@... [DynoMotion] wrote:
 
Hi Sam,

Those are big number so they should not be limiting speed.

You are specifying a Feed rate of 0.1 inches/minute.  That would be very slow.  For a Radius of 1 inch it would be:

0.1ipm / (1inch x 2Pi) =  0.0159 rad/minute = 0.912 deg/minute = 0.0152 degrees/sec

But the speed should change with the specified radius in the Trajectory Planner Screen.  You said it changes "slightly"  What does that mean?

Try specifying a much higher Feedrate.

Post the Radius you are specifying, the Feedrate Specified, and the Rate you are observing.



Here are some examples:

Using:
A Motor Counts/degree: 400
Velocity deg/sec: 100,000
Accel Deg/sec2: 200,000
Degrees=True
Radius Inches=1
Interpreter Length Mode=inch

All speeds are approximate, gauged by watching the DRO

G01 F.01 A360	(~.01 degrees/sec)
G01 F.1 A360 	(~.1 degrees/sec)
G01 F1 A360	(~1 degrees/sec)
G01 F2 A360	(~1 degrees/sec)
G01 F10 A360	(~1 degrees/sec)
G01 F50 A360	(~1 degrees/sec)
G01 F100 A360	(~1 degrees/sec)
G01 F1000 A360	(~1 degrees/sec)

It looks like slow feedrates, less than or equal to 1 are working, but feedrates larger than 1 are capped or clipped at 1 degree/sec.
Just as a reminder, this is all being done through KMotion dotnet.



In addition, here are the Motor Tuning settings I'm currently using....these are all set programmatically through kmotion dotnet:

 With .GetAxis(A_AXIS_ID, "")
                    .Velocity = 100000
                    .Acceleration = 200000
                    With .TuningParams
                        .InputMode = INPUTMODE_Enum.NO_INPUT_MODE
                        .OutputMode = OUTPUTMODE_Enum.STEP_DIR_MODE
                        .Jerk = 4000000.0
                        .Pgain = 0
                        .Igain = 0.01
                        .Dgain = 0
                        .FFAccel = 0
                        .FFVel = 0
                        .MaxI = 200
                        .MaxErr = 1000000.0
                        .MaxOutput = 200
                        .DeadBandGain = 1
                        .DeadBandRange = 0
                        .InputChan0 = 0
                        .InputChan1 = 0
                        .OutputChan0 = 11
                        .OutputChan1 = 0
                        .MasterAxis = -1
                        .LimitSwitch = "0x100"
                        '.limitswitchnegbit()
                        '.limitswitchposbit()
                        '.softlimitpos()
                        '.softlimitneg()
                        .InputGain0 = 1
                        .InputGain1 = 1
                        .InputOffset0 = 0
                        .InputOffset1 = 0
                        .OutputGain = -1
                        .OutputOffset = 0
                        .SlaveGain = 1
                        .InvDistPerCycle = 1
                        .Lead = 0
                        .MaxFollowingError = 1000000000
                        .StepperAmplitude = 20
                        .SetIIR0(1, 0, 0, 0, 0)
                        .SetIIR1(1, 0, 0, 0, 0)
                        .SetIIR2(0.000769, 0.001538, 0.000769, 1.92081, 0.923885)
                        .BacklashMode = BacklashMode_Enum.BACKLASH_LINEAR
                        .BacklashAmount = CDbl(.00033 * 400) 'Distance in inches multiplied by the steps per unit (inch).
                        .BacklashRate = 1000000
                    End With
End With

As I am just beginning to use the Interpreter of KMotion, I'm just now starting to see this issue. It appears that all the axes are behaving this way. It is not just limited to the Rotational A-Axis as I originally thought. Everything seems to behave fine unless I'm using the Interpreter to run GCode. Perhaps a settings conflict specific to the Interpreter?



--

sam marrocco | chief technical officer
ringside.cutters.picnic.moonlink

248 548 2500 w
248 910 3344 c

ringsidecreative.com

Group: DynoMotion Message: 10314 From: Tom Kerekes Date: 10/11/2014
Subject: Re: Rotational Axes & Radius relationship..additional settings
Hi Sam,

The default Trajectory Planner settings are a MaxVelA of 1 degree/sec so it seems the parameters are not being changed/upated somehow. 

These are actually parameters in a MOTION_PARAMS structure which is an object of CCoordMotion which is in turn an object of the CGCodeInterpreter.  Also the settings need to be applied to the Trajectory Planner by a call to SetTPParams.  But this should be performed automatically by the C# Property Setter.  See the excerpt below from \KMotion_dotNet\DM CoodMotion\KM_CoordMotion_MotionParams.cs


        /// <summary>
        /// Property setter Accessor for MaxVelA
        /// </summary>
        /// <param name="value">MaxVelA to set</param>
        private void Set_MaxVelA(double value)
        {
            try
            {
                KM_dotnet_Interop_CoordMotion_MOTION_PARAMS_Set_MaxVelA(_InstanceHandle, value);
                SetTPParams();
            }
            catch (DllNotFoundException e)
            {
                throw new DMException(this, e, String.Format("Dll Not Found Exception thrown :  Caller - [{0}] :: Member - [{1}]",
                    this.ToString(), "Set_MaxVelA"));
            }
            catch (EntryPointNotFoundException e)
            {
                throw new DMException(this, e, String.Format("Entry Point Not Found Exception thrown :  Caller - [{0}] :: Member - [{1}]",
                   this.ToString(), "Set_MaxVelA"));
            }
            catch (Exception e)
            {
                throw new DMException(this, e, String.Format("General Exception thrown :  Caller - [{0}] :: Member - [{1}]",
                  this.ToString(), "Set_MaxVelA"));
            }
        }

Try setting a break point in this code to make sure you are really setting the parameters.  Another possibility is that you somehow have more than one instances of Interpreter Object so the parameters being changed are different than the ones used for execution.

Regards
TK



From: "Sam Marrocco SMarrocco@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Saturday, October 11, 2014 9:58 AM
Subject: Re: [DynoMotion] Rotational Axes & Radius relationship..additional settings

 
On 10/9/2014 8:55 AM, Sam Marrocco SMarrocco@... [DynoMotion] wrote:
 

On 10/9/2014 1:17 AM, Tom Kerekes tk@... [DynoMotion] wrote:
 
Hi Sam,

Those are big number so they should not be limiting speed.

You are specifying a Feed rate of 0.1 inches/minute.  That would be very slow.  For a Radius of 1 inch it would be:

0.1ipm / (1inch x 2Pi) =  0.0159 rad/minute = 0.912 deg/minute = 0.0152 degrees/sec

But the speed should change with the specified radius in the Trajectory Planner Screen.  You said it changes "slightly"  What does that mean?

Try specifying a much higher Feedrate.

Post the Radius you are specifying, the Feedrate Specified, and the Rate you are observing.



Here are some examples:

Using:
A Motor Counts/degree: 400
Velocity deg/sec: 100,000
Accel Deg/sec2: 200,000
Degrees=True
Radius Inches=1
Interpreter Length Mode=inch

All speeds are approximate, gauged by watching the DRO

G01 F.01 A360	(~.01 degrees/sec)
G01 F.1 A360 	(~.1 degrees/sec)
G01 F1 A360	(~1 degrees/sec)
G01 F2 A360	(~1 degrees/sec)
G01 F10 A360	(~1 degrees/sec)
G01 F50 A360	(~1 degrees/sec)
G01 F100 A360	(~1 degrees/sec)
G01 F1000 A360	(~1 degrees/sec)

It looks like slow feedrates, less than or equal to 1 are working, but feedrates larger than 1 are capped or clipped at 1 degree/sec.
Just as a reminder, this is all being done through KMotion dotnet.



In addition, here are the Motor Tuning settings I'm currently using....these are all set programmatically through kmotion dotnet:

 With .GetAxis(A_AXIS_ID, "")
                    .Velocity = 100000
                    .Acceleration = 200000
                    With .TuningParams
                        .InputMode = INPUTMODE_Enum.NO_INPUT_MODE
                        .OutputMode = OUTPUTMODE_Enum.STEP_DIR_MODE
                        .Jerk = 4000000.0
                        .Pgain = 0
                        .Igain = 0.01
                        .Dgain = 0
                        .FFAccel = 0
                        .FFVel = 0
                        .MaxI = 200
                        .MaxErr = 1000000.0
                        .MaxOutput = 200
                        .DeadBandGain = 1
                        .DeadBandRange = 0
                        .InputChan0 = 0
                        .InputChan1 = 0
                        .OutputChan0 = 11
                        .OutputChan1 = 0
                        .MasterAxis = -1
                        .LimitSwitch = "0x100"
                        '.limitswitchnegbit()
                        '.limitswitchposbit()
                        '.softlimitpos()
                        '.softlimitneg()
                        .InputGain0 = 1
                        .InputGain1 = 1
                        .InputOffset0 = 0
                        .InputOffset1 = 0
                        .OutputGain = -1
                        .OutputOffset = 0
                        .SlaveGain = 1
                        .InvDistPerCycle = 1
                        .Lead = 0
                        .MaxFollowingError = 1000000000
                        .StepperAmplitude = 20
                        .SetIIR0(1, 0, 0, 0, 0)
                        .SetIIR1(1, 0, 0, 0, 0)
                        .SetIIR2(0.000769, 0.001538, 0.000769, 1.92081, 0.923885)
                        .BacklashMode = BacklashMode_Enum.BACKLASH_LINEAR
                        .BacklashAmount = CDbl(.00033 * 400) 'Distance in inches multiplied by the steps per unit (inch).
                        .BacklashRate = 1000000
                    End With
End With

As I am just beginning to use the Interpreter of KMotion, I'm just now starting to see this issue. It appears that all the axes are behaving this way. It is not just limited to the Rotational A-Axis as I originally thought. Everything seems to behave fine unless I'm using the Interpreter to run GCode. Perhaps a settings conflict specific to the Interpreter?



--

sam marrocco | chief technical officer
ringside.cutters.picnic.moonlink

248 548 2500 w
248 910 3344 c

ringsidecreative.com



Group: DynoMotion Message: 10317 From: Sam Marrocco Date: 10/11/2014
Subject: Re: Rotational Axes & Radius relationship..additional settings
On 10/11/2014 5:01 PM, Tom Kerekes tk@... [DynoMotion] wrote:
 
Hi Sam,

The default Trajectory Planner settings are a MaxVelA of 1 degree/sec so it seems the parameters are not being changed/upated somehow. 

These are actually parameters in a MOTION_PARAMS structure which is an object of CCoordMotion which is in turn an object of the CGCodeInterpreter.  Also the settings need to be applied to the Trajectory Planner by a call to SetTPParams.  But this should be performed automatically by the C# Property Setter.  See the excerpt below from \KMotion_dotNet\DM CoodMotion\KM_CoordMotion_MotionParams.cs




That was the clue I needed.
Apparently the MaxVelA was not being set (on my end). Knowing the default Trajectory Planner value made the connection.
Setting that value cured the issue. Thanks!

--

sam marrocco | chief technical officer
ringside.cutters.picnic.moonlink

248 548 2500 w
248 910 3344 c

ringsidecreative.com